<?php
/**
 * Template Name: Custom Page Template
 * Description: A custom page template to display content from the editor.
 *
 * @package wanzicms
 */

get_header();
?>

<div id="primary" class="content-area flex-grow">
    <main id="main" class="site-main container mx-auto pt-24 pb-8 px-4 sm:px-6 lg:px-8">

        <?php
        while ( have_posts() ) :
            the_post();
            ?>

            <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
                <header class="entry-header mb-6">
                    <?php the_title( '<h1 class="entry-title text-3xl font-bold leading-tight text-gray-900">', '</h1>' ); ?>
                </header><!-- .entry-header -->

                <div class="entry-content prose max-w-none">
                    <?php
                    the_content();

                    wp_link_pages(
                        array(
                            'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'wanzicms' ),
                            'after'  => '</div>',
                        )
                    );
                    ?>
                </div><!-- .entry-content -->

            </article><!-- #post-<?php the_ID(); ?> -->

            <?php
            // If comments are open or we have at least one comment, load up the comment template.
            if ( comments_open() || get_comments_number() ) :
                comments_template();
            endif;

        endwhile; // End of the loop.
        ?>

    </main><!-- #main -->
</div><!-- #primary -->

<?php
get_footer(); 